var __extends =
    (this && this.__extends) ||
    (function () {
      var e = function (i, t) {
        return (e =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (e, i) {
              e.__proto__ = i;
            }) ||
          function (e, i) {
            for (var t in i)
              Object.prototype.hasOwnProperty.call(i, t) && (e[t] = i[t]);
          })(i, t);
      };
      return function (i, t) {
        function a() {
          this.constructor = i;
        }
        if ("function" != typeof t && null !== t)
          throw new TypeError(
            "Class extends value " + String(t) + " is not a constructor or null"
          );
        e(i, t),
          (i.prototype =
            null === t
              ? Object.create(t)
              : ((a.prototype = t.prototype), new a()));
      };
    })(),
  AXWearableGoodView = (function (e) {
    function i() {
      var i = e.call(this) || this;
      return (
        (i.spaceTime = 0),
        (i.onLoaderableKuangShiDataFn = {
          caller: i,
          code: 2031,
          method: function (e) {
            if (0 == e.code) {
              var t = i.listArr[i.list_wear_kuangshi.selectedIndex];
              AXWearKuangShiDialog.showKuangShiDialog(t, "矿石");
            } else ToastView.toastView(e.msg);
          },
        }),
        (i.onLoadearableGoodZhuangBeiItemDataFn = {
          caller: i,
          code: 1423,
          method: function (e) {
            if (0 == e.code && 1 == i.tab_wearable.selectedIndex) {
              (i.listArr = e.list),
                i.listArr.length > 0 &&
                  1 == i.tab_wearable.selectedIndex &&
                  (i.list_wear_zhuangbei.visible = !0);
              var t;
              i.dataSource = [];
              for (var a = 0; a < i.listArr.length; a++)
                (t = {
                  label_army_name: { text: i.listArr[a].name },
                  label_army_describle: { text: i.listArr[a].stone },
                  label_army_lvl: { text: i.listArr[a].level + "级" },
                  btn_army_shiyong: { label: "穿戴" },
                  id: i.listArr[a].id,
                  type: i.listArr[a].type,
                }),
                  i.dataSource.push(t);
              i.list_wear_zhuangbei.dataSource = i.dataSource;
            }
          },
        }),
        (i.onLoadRoadBookDataFn = {
          caller: i,
          code: 1073,
          method: function (e) {
            0 == e.code ? i.onWearableCancleFn() : ToastView.toastView(e.msg);
          },
        }),
        (i.onLoaderableArmyChuangDaiDataFn = {
          caller: i,
          code: 1137,
          method: function (e) {
            if (0 == e.code) {
              i.lbl_wearLoader.text = e.data.weight + "/" + e.data.maxWeight;
              i.listArr[i.list_goods_list.selectedIndex];
              ToastView.toastView("穿戴成功"),
                WebSocketService.send({ c: 1423, d: { pageNum: 0 } });
            } else ToastView.toastView(e.msg);
          },
        }),
        i.tab_wearable.on(Laya.Event.CLICK, i, i.onTabWearableDidClickFn),
        i.tab_wearableKuangshi.on(
          Laya.Event.CLICK,
          i,
          i.onTabKuangShiDidClickFn
        ),
        WebSocketService.addListener({
          caller: i,
          code: 1416,
          method: i.onLoadearableYaoPainAndZaWuDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 1425,
          method: i.onLoadearableYaoPainAndZaWuDataFn,
        }),
        WebSocketService.addListener(i.onLoadearableGoodZhuangBeiItemDataFn),
        WebSocketService.addListener({
          caller: i,
          code: 6034,
          method: i.onLoaderableBaoShiDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 6008,
          method: i.onLoaderableBaoShiDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 6035,
          method: i.onLoaderableBaoShiDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 6414,
          method: i.onLoadZhaoXianBangDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 6413,
          method: i.onLoadGuoShiLingDataFn,
        }),
        WebSocketService.addListener(i.onLoaderableKuangShiDataFn),
        WebSocketService.addListener(i.onLoaderableArmyChuangDaiDataFn, !0),
        WebSocketService.addListener(i.onLoadRoadBookDataFn),
        WebSocketService.addListener({
          caller: i,
          code: 1075,
          method: i.onLoadUserTiLiDanDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 6067,
          method: i.onLoadUserDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 1085,
          method: i.onLoadUserDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 1076,
          method: i.onLoadUserDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 1476,
          method: i.onLoadMyLoadData,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 1904,
          method: i.onLoadUserDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 1082,
          method: i.onLoadUserDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 1059,
          method: i.onLoadCureDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 1241,
          method: i.onLoadCureDataFn,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 1074,
          method: i.onLoadUseGiftData,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 1909,
          method: i.onLoadHuFuData,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 5310,
          method: i.onLoadSignTakeData,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 5310,
          method: i.onHaoKeTakeData,
        }),
        WebSocketService.addListener({
          caller: i,
          code: 5310,
          method: i.onSuperHaoKeTakeData,
        }),
        i.btn_wearable_cancle.on(Laya.Event.CLICK, i, i.onWearableCancleFn),
        (i.list_wear_zhuangbei.selectEnable = !0),
        (i.list_wear_zhuangbei.vScrollBarSkin = ""),
        i.list_wear_zhuangbei.on(
          Laya.Event.CLICK,
          i,
          i.onWearZhuangBeiDidClickFn
        ),
        (i.list_wear_zhuangbei.scrollBar.changeHandler = new Handler(
          i,
          i.onLoadMoreEquimentData
        )),
        (i.list_wearable.visible = !1),
        (i.list_goods_list.selectEnable = !0),
        (i.list_goods_list.vScrollBarSkin = ""),
        i.list_goods_list.on(Laya.Event.CLICK, i, i.onWearableDidClickFn),
        (i.list_goods_list.renderHandler = new Laya.Handler(
          i,
          i.updateWearableItem
        )),
        (i.list_goods_list.scrollBar.changeHandler = new Handler(
          i,
          i.onLoadMoreData
        )),
        (i.list_wear_kuangshi.selectEnable = !0),
        (i.list_wear_kuangshi.vScrollBarSkin = ""),
        i.list_wear_kuangshi.on(
          Laya.Event.CLICK,
          i,
          i.onWearableBaoShiDidClickFn
        ),
        (i.list_wear_kuangshi.scrollBar.changeHandler = new Handler(
          i,
          i.onLoadMoreKSData
        )),
        (i.list_wear_kuangshi.renderHandler = new Laya.Handler(
          i,
          i.updateBaoShiItem
        )),
        i.btn_zhiliao1.on(Laya.Event.CLICK, i, i.onDidClickZhiLiaoAction),
        i.btn_zhiliao2.on(Laya.Event.CLICK, i, i.onDidClickZhiLiaoAction),
        i
      );
    }
    return (
      __extends(i, e),
      (i.openView = function () {
        return (
          null == this.wearableVC && (this.wearableVC = new i()),
          (this.wearableVC.tab_wearable.selectedIndex = 0),
          (this.wearableVC.tab_wearableKuangshi.visible = !1),
          (this.wearableVC.list_wear_kuangshi.visible = !1),
          (this.wearableVC.list_wear_zhuangbei.visible = !1),
          (this.wearableVC.image_wearable.visible = !1),
          (this.wearableVC.list_goods_list.visible = !1),
          WebSocketService.send({ c: 1416, d: { pageNum: 0 } }),
          WebSocketService.send({ c: 1476 }),
          (this.wearableVC.currentPage = 0),
          this.wearableVC
        );
      }),
      (i.prototype.onLoadMyLoadData = function (e) {
        0 == e.code && (this.lbl_wearLoader.text = e.data[0] + "/" + e.data[1]);
      }),
      (i.prototype.onLoadMoreData = function (e) {
        var i = e / this.list_goods_list.scrollBar.max,
          t = new Date(),
          a = !1;
        if (
          (t.getTime() - this.spaceTime >= 3e3 && (a = !0),
          1 == i && 0 == this.isloading && a)
        )
          return (
            (this.isloading = !0),
            this.currentPage++,
            0 == this.tab_wearable.selectedIndex ||
              (1 == this.tab_wearable.selectedIndex
                ? WebSocketService.send({
                    c: 1423,
                    d: { pageNum: this.currentPage },
                  })
                : 2 == this.tab_wearable.selectedIndex ||
                  this.tab_wearable.selectedIndex),
            void (this.spaceTime = t.getTime())
          );
      }),
      (i.prototype.onLoadMoreEquimentData = function (e) {
        var i = e / this.list_wear_zhuangbei.scrollBar.max,
          t = new Date(),
          a = !1;
        if (
          (t.getTime() - this.spaceTime >= 3e3 && (a = !0),
          1 == i && 0 == this.isloading && a)
        )
          return (
            (this.isloading = !0),
            this.currentPage++,
            1 == this.tab_wearable.selectedIndex &&
              WebSocketService.send({
                c: 1423,
                d: { pageNum: this.currentPage },
              }),
            void (this.spaceTime = t.getTime())
          );
      }),
      (i.prototype.onLoadMoreKSData = function (e) {
        var i = e / this.list_wear_kuangshi.scrollBar.max,
          t = new Date(),
          a = !1;
        if (
          (t.getTime() - this.spaceTime >= 3e3 && (a = !0),
          1 == i && 0 == this.isloading && a)
        )
          return (
            (this.isloading = !0),
            this.currentPage++,
            0 == this.tab_wearableKuangshi.selectedIndex
              ? WebSocketService.send({
                  c: 6034,
                  d: { pageNum: this.currentPage },
                })
              : 1 == this.tab_wearableKuangshi.selectedIndex
              ? WebSocketService.send({
                  c: 6008,
                  d: { pageNum: this.currentPage },
                })
              : 2 == this.tab_wearableKuangshi.selectedIndex &&
                WebSocketService.send({
                  c: 6035,
                  d: { pageNum: this.currentPage },
                }),
            void (this.spaceTime = t.getTime())
          );
      }),
      (i.prototype.onLoaderableBaoShiDataFn = function (e) {
        if (0 == e.code) {
          if (this.currentPage >= 1) {
            if (0 == e.list.length) return void this.currentPage--;
            for (a = 0; a < e.list.length; a++) {
              var i = e.list[a];
              this.listArr.push(i), (this.dataSource = []);
            }
          } else (this.listArr = e.list), (this.dataSource = []);
          this.listArr.length > 0 && (this.list_wear_kuangshi.visible = !0),
            (this.isloading = !1);
          var t;
          if (6034 == e.act_id)
            for (a = 0; a < this.listArr.length; a++)
              (t = {
                lbl_baoshiName: {
                  text: this.listArr[a].lvl + "级 " + this.listArr[a].name,
                },
                lbl_baoshiNum: { text: "" },
                btn_baoshititle: { label: "镶嵌" },
                id: this.listArr[a].id,
                name: this.listArr[a].name,
              }),
                this.dataSource.push(t);
          else if (6008 == e.act_id)
            for (a = 0; a < this.listArr.length; a++)
              (t = {
                lbl_baoshiName: { text: this.listArr[a].name },
                lbl_baoshiNum: { text: this.listArr[a].num + "个" },
                btn_baoshititle: { label: "使用" },
                id: this.listArr[a].id,
                name: this.listArr[a].name,
              }),
                this.dataSource.push(t);
          else if (6035 == e.act_id)
            for (var a = 0; a < this.listArr.length; a++)
              (t = {
                lbl_baoshiName: {
                  text:
                    this.listArr[a].lvl +
                    "级 " +
                    this.listArr[a].name +
                    "(" +
                    this.listArr[a].num +
                    "魂)",
                },
                lbl_baoshiNum: { text: "" },
                btn_baoshititle: { label: "使用" },
                id: this.listArr[a].id,
                lvl: this.listArr[a].lvl,
                name: this.listArr[a].name,
              }),
                this.dataSource.push(t);
          this.list_wear_kuangshi.dataSource = this.dataSource;
        }
      }),
      (i.prototype.onWearableBaoShiDidClickFn = function (e) {
        if ("" != e.target.name) {
          var i = this.list_wear_kuangshi.selectedItem;
          "btn_baoshititle" == e.target.name
            ? "镶嵌" == e.target.label
              ? AXMagicInlayDialog.showInsertBaoShiView(i)
              : WebSocketService.send({ c: 2031, d: { id: i.id } })
            : 0 == this.tab_wearableKuangshi.selectedIndex
            ? AXWearKuangShiDialog.showKuangShiDialog(i, "宝石")
            : 2 == this.tab_wearableKuangshi.selectedIndex
            ? AXHunDanDetailsDialog.showHunDanDialog(i, "AXWearableGoodView")
            : AXWearKuangShiDialog.showKuangShiDialog(i, "矿石");
        }
      }),
      (i.prototype.onLoadearableYaoPainAndZaWuDataFn = function (e) {
        if (0 == e.code) {
          var i;
          if (1416 == e.act_id) {
            if (0 != this.tab_wearable.selectedIndex) return;
            if (((i = e.list), this.currentPage >= 1)) {
              if (0 == i.length) return void this.currentPage--;
              for (o = 0; o < i.length; o++) {
                var t = i[o];
                this.listArr.push(t);
              }
              this.dataSource = [];
            } else (this.listArr = i), (this.dataSource = []);
          } else if (1425 == e.act_id) {
            if (3 != this.tab_wearable.selectedIndex) return;
            (i = e.data), (this.listArr = i), (this.dataSource = []);
          }
          this.listArr.length > 0 &&
            ((this.image_wearable.visible = !0),
            (this.list_goods_list.visible = !0)),
            (this.isloading = !1);
          var a;
          if (1416 == e.act_id)
            for (o = 0; o < this.listArr.length; o++)
              (a = {
                wearable_name_title: {
                  text:
                    this.listArr[o].name +
                    " " +
                    this.dealWearableGoodsType(this.listArr[o]),
                },
                wearable_number: { text: this.listArr[o].num + "个" },
                wearable_button: { label: "使用" },
                type: this.listArr[o].type,
                item_good_name: { text: this.listArr[o].name },
                item_goods_nums: { text: this.listArr[o].num },
                pic: this.listArr[o].pic,
              }),
                this.dataSource.push(a);
          else if (1425 == e.act_id) {
            this.dataSource = [];
            for (var o = 0; o < this.listArr.length; o++)
              (a = {
                wearable_name_title: { text: this.listArr[o].name },
                wearable_number: { text: +this.listArr[o].num + "个" },
                wearable_button: { label: "使用" },
                id: this.listArr[o].id,
                type: this.listArr[o].type,
                item_good_name: { text: this.listArr[o].name },
                item_goods_nums: { text: this.listArr[o].num },
                pic: this.listArr[o].pic,
              }),
                this.dataSource.push(a);
          }
          this.list_goods_list.dataSource = this.dataSource;
        }
      }),
      (i.prototype.dealSubDescries = function (e) {
        var i = e.indexOf("("),
          t = e.indexOf(")");
        return -1 != i || -1 != t ? e.substr(i, t) : e;
      }),
      (i.prototype.dealButtonHide = function (e) {
        return (
          "78" == e ||
          "79" == e ||
          "80" == e ||
          "81" == e ||
          "157" == e ||
          "158" == e ||
          "159" == e
        );
      }),
      (i.prototype.updateListItem = function (e, i) {
        e >= 0 &&
          e < this.dataSource.length &&
          ((this.dataSource[e] = i), this.list_goods_list.refresh());
      }),
      (i.prototype.updateWearableItem = function (e, i) {
        if (!(i > this.dataSource.length)) {
          e.dataSource;
          if (0 == this.tab_wearable.selectedIndex) {
            var t = e.getChildByName("item_goods_pic"),
              a = e.getChildByName("item_good_name");
            e.dataSource.pic
              ? (t.skin = "comp/goods/" + e.dataSource.pic)
              : (t.skin = "comp/goods/none.png");
            var o = this.listArr[i].type;
            1 == o
              ? (a.color = "#FF4500")
              : 2 == o
              ? (a.color = "#00BFFF")
              : 3 == o && (a.color = "#FFF000");
          } else if (1 == this.tab_wearable.selectedIndex);
          else if (2 == this.tab_wearable.selectedIndex);
          else if (3 == this.tab_wearable.selectedIndex) {
            t = e.getChildByName("item_goods_pic");
            e.dataSource.pic
              ? (t.skin = "comp/goods/" + e.dataSource.pic)
              : (t.skin = "comp/goods/none.png");
            (a = e.getChildByName("item_good_name")).color = "#FFD700";
          }
        }
      }),
      (i.prototype.onWearZhuangBeiDidClickFn = function (e) {
        if ("" != e.target.name) {
          var i = e.target.parent.dataSource;
          if ("btn_army_shiyong" == e.target.name)
            WebSocketService.send({ c: 1137, d: { id: i.id } });
          else if (e.target.name) {
            var t = this.listArr[this.list_wear_zhuangbei.selectedIndex];
            AXSupplemnetArmyDialog.showSuppleArmyDialog(t);
          }
        }
      }),
      (i.prototype.onWearableDidClickFn = function (e) {
        if ("" != e.target.name)
          if ("wearable_button" == e.target.name) {
            if (0 == this.tab_wearable.selectedIndex) {
              i = this.listArr[this.list_goods_list.selectedIndex];
              AXSupplementPhysicalView.showPhysicalView(i);
            } else if (1 == this.tab_wearable.selectedIndex) {
              i = this.listArr[this.list_wearable.selectedIndex];
              WebSocketService.send({ c: 1137, d: { id: i.id } });
            } else if (3 == this.tab_wearable.selectedIndex) {
              if (
                78 ==
                  (i = this.listArr[this.list_goods_list.selectedIndex]).id ||
                79 == i.id ||
                80 == i.id ||
                81 == i.id ||
                157 == i.id ||
                158 == i.id ||
                159 == i.id
              )
                return;
              this.organizerSackUsingThing(i);
            }
          } else if (e.target.name)
            if (0 == this.tab_wearable.selectedIndex) {
              i = this.listArr[this.list_goods_list.selectedIndex];
              AXWearKuangShiDialog.showKuangShiDialog(i, "药品");
            } else if (1 == this.tab_wearable.selectedIndex) {
              i = this.listArr[this.list_wearable.selectedIndex];
              AXSupplemnetArmyDialog.showSuppleArmyDialog(i);
            } else if (3 == this.tab_wearable.selectedIndex) {
              var i = this.listArr[this.list_goods_list.selectedIndex];
              AXWearKuangShiDialog.showKuangShiDialog(i, "杂物");
            }
      }),
      (i.prototype.organizerSackUsingThing = function (e) {
        if (68 == e.id || 69 == e.id || 381 == e.id)
          AXRecruitmentDialog.showRecruitmentOpen("1", "AXWearableGoodView");
        else if (71 == e.id || 72 == e.id)
          AXSendGiftDialog.showSendGiftDialog(e);
        else if (73 == e.id) WebSocketService.send({ c: 1074, d: { gid: 73 } });
        else if (74 == e.id) WebSocketService.send({ c: 1073, d: null });
        else if (75 == e.id) AXWorshipDialog.showWorshipDialog("");
        else if (83 == e.id || 84 == e.id)
          WearableUsedDialog.showWearableShow(e.id, e.num);
        else if (82 == e.id)
          WebSocketService.send({ c: 1075, d: { gid: e.id } });
        else if (85 == e.id) AXChangeNewNameDialog.showChangeNameDialog();
        else if (87 == e.id || 88 == e.id || 89 == e.id)
          WebSocketService.send({ c: 1076, d: { gid: e.id } });
        else if (123 == e.id)
          AXCommonConfirmDialog.showConfirmDialog(
            "",
            e.name,
            "您确定要进入游乐场进行使用吗？",
            "确定",
            "取消"
          );
        else if (
          131 == e.id ||
          132 == e.id ||
          133 == e.id ||
          134 == e.id ||
          135 == e.id
        )
          WearableUsedDialog.showWearableShow(e.id, e.num);
        else if (147 == e.id || 148 == e.id || 149 == e.id || 425 == e.id)
          WearableUsedDialog.showWearableShow(e.id, e.num);
        else if (
          252 == e.id ||
          253 == e.id ||
          254 == e.id ||
          255 == e.id ||
          256 == e.id
        )
          AXMaterialDialog.showMateralView(e, e.name, e.num, !0);
        else if (396 == e.id) WebSocketService.send({ c: 6067 });
        else if (271 == e.id || 400 == e.id || 434 == e.id)
          WebSocketService.send({ c: 1085, d: { gid: e.id } });
        else if (108 == e.id || 109 == e.id)
          WebSocketService.send({ c: 1082, d: { gid: e.id } });
        else if (e.id > 500 && e.id < 509)
          WebSocketService.send({ c: 1904, d: { gid: e.id } });
        else if (408 == e.id) WearableUsedDialog.showWearableShow(e.id, e.num);
        else if (
          409 == e.id ||
          242 == e.id ||
          243 == e.id ||
          244 == e.id ||
          245 == e.id
        )
          WearableUsedDialog.showWearableShow(e.id, e.num);
        else if (e.id >= 302 && e.id <= 306)
          WearableUsedDialog.showWearableShow(e.id, e.num);
        else if (421 == e.id) {
          e.id;
          var i = { id: e.id, type: "魂元丹", num: e.num };
          UseHunDanDialog.showUseHunView(i);
        } else
          440 == e.id ||
          284 == e.id ||
          285 == e.id ||
          286 == e.id ||
          441 == e.id
            ? AXMaterialDialog.showMateralView(e, e.name, e.num, !0)
            : 426 == e.id
            ? ((this.wear_id = e.id),
              NormalDialog.showNormalDialog(
                "您确定使用招贤榜吗",
                this,
                this.onQueDingZhaoXianBangFn
              ))
            : 427 == e.id
            ? ((this.wear_id = e.id),
              WebSocketService.send({ c: 6413, d: { gid: e.id } }))
            : e.id >= 601 && e.id <= 650
            ? ((this.wear_id = e.id),
              this.listArr[this.list_goods_list.selectedIndex].num >= 10
                ? NormalDialog.showNormalDialog(
                    "您是否消耗10个虎符召唤一个国士？",
                    this,
                    this.onZhaoHuanHuFuFn
                  )
                : ToastView.toastView("虎符数量不足10个"))
            : 651 == e.id
            ? AXMaterialDialog.showMateralView(e, "手里剑", e.num)
            : 653 == e.id
            ? NormalDialog.showNormalDialog(
                "确定使用一个签到令牌？",
                this,
                this.onDailySignFn
              )
            : 654 == e.id
            ? NormalDialog.showNormalDialog(
                "确定使用一个幸运转盘红包?",
                this,
                this.onUseHongBaoFn
              )
            : 655 == e.id
            ? NormalDialog.showNormalDialog(
                "确定使用一个壕客令牌?",
                this,
                this.onUseHaoKeFn
              )
            : 656 == e.id &&
              NormalDialog.showNormalDialog(
                "确定使用一个超级壕客令牌?",
                this,
                this.onUseSuperHaoKeFn
              );
      }),
      (i.prototype.onDailySignFn = function () {
        WebSocketService.send({ c: 5310, d: { goodsId: 653, count: 1 } });
      }),
      (i.prototype.onUseHongBaoFn = function () {
        WebSocketService.send({ c: 5310, d: { goodsId: 654, count: 1 } });
      }),
      (i.prototype.onUseHaoKeFn = function () {
        WebSocketService.send({ c: 5310, d: { goodsId: 655, count: 1 } });
      }),
      (i.prototype.onUseSuperHaoKeFn = function () {
        WebSocketService.send({ c: 5310, d: { goodsId: 656, count: 1 } });
      }),
      (i.prototype.onZhaoHuanHuFuFn = function () {
        WebSocketService.send({ c: 1909, d: { gid: this.wear_id } });
      }),
      (i.prototype.onQueDingZhaoXianBangFn = function (e) {
        WebSocketService.send({ c: 6414, d: { gid: this.wear_id } });
      }),
      (i.prototype.onHuFuNumberNoEnoughFn = function () {}),
      (i.prototype.onLoadZhaoXianBangDataFn = function (e) {
        e.code, ToastView.toastView(e.msg), WebSocketService.send({ c: 1425 });
      }),
      (i.prototype.onLoadGuoShiLingDataFn = function (e) {
        ToastView.toastView(e.msg), WebSocketService.send({ c: 1425 });
      }),
      (i.prototype.onLoadUserTiLiDanDataFn = function (e) {
        WebSocketService.send({ c: 1425 }),
          WebSocketService.send({ c: 1331, d: null }),
          Laya.stage.event("GameMainView", "exp"),
          Laya.stage.event("HomePageView", "exp"),
          ToastView.toastView(e.msg);
      }),
      (i.prototype.onLoadUserDataFn = function (e) {
        ToastView.toastView(e.msg),
          0 == e.code &&
            (WebSocketService.send({ c: 1425 }),
            (6067 != e.act_id && 1904 != e.act_id) ||
              (Laya.stage.event("GameMainView", "refreshMoney"),
              Laya.stage.event("HomePageView", "refreshMoney")),
            1085 == e.act_id &&
              (Laya.stage.event("GameMainView", "exp"),
              Laya.stage.event("HomePageView", "exp")),
            1082 == e.act_id && WebSocketService.send({ c: 1476 }));
      }),
      (i.prototype.onTabWearableDidClickFn = function (e) {
        (this.tab_wearableKuangshi.visible = !1),
          (this.list_wear_kuangshi.visible = !1),
          (this.list_wear_zhuangbei.visible = !1),
          (this.image_wearable.visible = !1),
          (this.list_goods_list.visible = !1),
          (this.tab_wearableKuangshi.visible = !1),
          (this.list_wear_kuangshi.visible = !1),
          (this.btn_zhiliao1.visible = !1),
          (this.btn_zhiliao2.visible = !1),
          "item0" == e.target.name
            ? (WebSocketService.send({ c: 1416, d: { pageNum: 0 } }),
              this.list_wearable.scrollTo(0),
              (this.btn_zhiliao1.visible = !0),
              (this.btn_zhiliao2.visible = !0))
            : "item1" == e.target.name
            ? (WebSocketService.send({ c: 1423, d: { pageNum: 0 } }),
              this.list_wear_zhuangbei.scrollTo(0))
            : "item2" == e.target.name
            ? ((this.tab_wearableKuangshi.selectedIndex = 0),
              (this.tab_wearableKuangshi.visible = !0),
              WebSocketService.send({ c: 6034, d: { pageNum: 0 } }),
              this.list_wearable.scrollTo(0))
            : "item3" == e.target.name &&
              (WebSocketService.send({ c: 1425 }),
              this.list_goods_list.scrollTo(0)),
          (this.listArr = []),
          (this.currentPage = 0);
      }),
      (i.prototype.onTabKuangShiDidClickFn = function (e) {
        "item0" == e.target.name
          ? WebSocketService.send({ c: 6034, d: { pageNum: 0 } })
          : "item1" == e.target.name
          ? WebSocketService.send({ c: 6008, d: { pageNum: 0 } })
          : "item2" == e.target.name &&
            WebSocketService.send({ c: 6035, d: { pageNum: 0 } }),
          (this.currentPage = 0),
          this.list_wear_kuangshi.scrollTo(0);
      }),
      (i.prototype.dealWearableGoodsType = function (e) {
        var i = e.id;
        if (1 == e.type) {
          i > 279 && (i -= 279);
          return Dictionary.medicaDict[i].bloValue;
        }
        if (2 == e.type) {
          i > 298 && (i -= 282);
          return Dictionary.powerDict[i].bloValue;
        }
        return "";
      }),
      (i.prototype.onDidClickZhiLiaoAction = function (e) {
        "item_zhiliao1" == e.target.name
          ? WebSocketService.send({ c: 1241, d: { qr: 9 } })
          : "item_zhiliao2" == e.target.name &&
            WebSocketService.send({ c: 1059 });
      }),
      (i.prototype.onLoadCureDataFn = function (e) {
        this &&
          1 == this.visible &&
          ("1059" == e.act_id
            ? (0 == e.code &&
                (Laya.stage.event("GameMainView", "exp"),
                Laya.stage.event("HomePageView", "exp")),
              ToastView.toastView(e.msg))
            : "1241" == e.act_id &&
              (0 == e.code &&
                (Laya.stage.event("GameMainView", "exp"),
                Laya.stage.event("HomePageView", "exp")),
              ToastView.toastView(e.msg)));
      }),
      (i.prototype.updateBaoShiItem = function (e, i) {
        var t = e.getChildByName("btn_baoshititle");
        2 == this.tab_wearableKuangshi.selectedIndex
          ? (t.visible = !1)
          : (t.visible = !0);
      }),
      (i.prototype.onLoadUseGiftData = function (e) {
        0 == e.code &&
          (ToastView.toastView(e.msg), WebSocketService.send({ c: 1425 }));
      }),
      (i.prototype.onLoadHuFuData = function (e) {
        0 == e.code &&
          (ToastView.toastView(e.msg), WebSocketService.send({ c: 1425 }));
      }),
      (i.prototype.onLoadSignTakeData = function (e) {
        ToastView.toastView(e.msg), WebSocketService.send({ c: 1425 });
      }),
      (i.prototype.onWearableCancleFn = function () {
        this.removeSelf();
      }),
      i
    );
  })(ui.TabBarItemController.AXWearableGoodViewUI);
